const initState={
    title:'',
    answer:'',
    type:'',
    options:null,
    desc:'',
    grade:null,
    course:'',
    publisher:null,
    expanded:true
}

function problem(prevState=initState, action){
    const {data, type} = action
    let newState
    switch (type) {
        case 'get':
            newState = data
            return newState
        default:
            return prevState
    }
}

export default problem